/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cardgame.game.events;

import cardgame.game.*;

/**
 *
 * @author Carl
 */
public class AddManaEvent extends Event{

    public AddManaEvent(Player player, ManaProvider manaProvider){
        this.player = player;
        this.manaProvider = manaProvider;
    }
    protected Player player;
    protected ManaProvider manaProvider;

    @Override
    public void trigger(Game game){
        Card manaCard = (Card) manaProvider;
        manaCard.setOwner(player);
        player.getManaPool().add(manaCard);
    }

    public Player getPlayer(){
        return player;
    }

    public ManaProvider getManaProvider(){
        return manaProvider;
    }
}
